package com.weng.coder.common.utils;

import org.apache.commons.lang3.StringUtils;

/**
 * @author wengzhonghui
 * @date 2021/1/13 19:01
 */
public class DbUtils {

		/*
		 * 清除SQL中的特殊字符
		 * 例如mysql中的 `remark` 改为 remark
		 * @param [sql]
		 * @return
		 */
		public static String clearSpecialCharacters(String sql){
				if(StringUtils.isNotEmpty(sql)){
						sql = sql.trim();
						sql = sql.replaceAll("`","");
						sql = sql.replaceAll("'","");
						sql = sql.replaceAll("\"","");
				}
				return sql;
		}

}
